<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function fileUploader($path, $file)
    {
        $fileName = date("YmdHis").rand(100,999).".".$file->getClientOriginalExtension();
        $file->move(public_path($path),$fileName);
        $fileSRC = $path."/".$fileName;
        return $fileSRC;
    }
}
